home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- * Regular Expressions Library *
- * Copyright (c) 1989 by Windfall Software Systems. All Rights Reserved. *
- ****************************************************************************
- * API definitions - wssrx.h *
- ****************************************************************************/
-
- #ifndef WSSDEF_RX // Prevent redefinition
-
- typedef
- struct { // Element of a feedback array
- WORD pos; // Starting position of a group match
- WORD size; // Its size
- } RX;
-
- BOOL PASCAL FAR
- RxMatch(RX FAR rx[],short nLim,LPSTR lszRex,LPSTR lszTxt);
-
- LPSTR PASCAL FAR
- RxExtract(RX FAR rx[],short nN,LPSTR lszTxt,LPSTR lszDst,short nSize);
-
- LPSTR PASCAL FAR
- RxReplace(RX FAR rx[],short nLim,LPSTR lszTxt,LPSTR lszDst,short nSize);
-
- int PASCAL FAR
- RxMsgText(RX FAR rx[],LPSTR lszMsg,short nSize);
-
- /* Ordinal numbers of the functions for use */
- /* with GetProcAddress() to achieve the */
- /* dynamic linking
- #define OV_RXMATCH MAKEINTRESOURCE(1)
- #define OV_RXEXTRACT MAKEINTRESOURCE(2)
- #define OV_RXREPLACE MAKEINTRESOURCE(3)
- #define OV_RXMSGTEXT MAKEINTRESOURCE(4)
-
- /* Error codes */
- #define ERR_NULLPARM 1 /* Rex or Txt parameter is NULL */
- #define ERR_REXTOOLONG 2 /* Rex too long */
- #define ERR_TOODEEP 3 /* {{{ }}} too deep */
- #define ERR_NORBRACE 4 /* Missing right parenthesis */
- #define ERR_NOLBRACE 5 /* Missing left parenthesis */
- #define ERR_EMPTYITER 6 /* Iteration (+*) on empty string */
- #define ERR_NESTEDITER 7 /* Nested iteration */
- #define ERR_RANGEINV 8 /* Invalid range */
- #define ERR_NORBRACKET 9 /* Missing right bracket */
- #define ERR_ENDESCAPE 10 /* Incomplete escape sequence */
- #define ERR_LOGIC 11 /* Logic error */
-
- #define WSSDEF_RX
- #endif